package com.unknow.first.dapp.admin.account.service;

import java.math.BigDecimal;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

public interface WithdrawAroundInterface {

    final static String WITHDRAW_AROUND_BEAN_PREFIX = "withdrawAroundBean.";

    @Transactional(rollbackFor = Exception.class, propagation = Propagation.MANDATORY)
    BigDecimal doBefore(final String address, Integer coinId, final BigDecimal originAmount) throws Exception;

    @Transactional(rollbackFor = Exception.class, propagation = Propagation.MANDATORY)
    void doAfter(final String address, Integer coinId, final BigDecimal originAmount,final BigDecimal realAmount) throws Exception;

}
